package middlecontent.order;

import org.junit.Test;

import java.io.File;

public class NewTest {
    public void newInstance(){
        Object obj = new Object();
        File file = new File("111111");
    }

    public void newArray(){
        int[] intArray = new int[10];
        Object[] objArray = new Object[10];
        int[][] mintArray = new int[10][10];
        String[][] stringArray = new String[10][5];
    }

    @Test
    public void f(){
        float f1 = (float) (0/0.0);
        float f2 = (float) (0/0.0);
        System.out.println(f1);
        System.out.println(f1==f2);
    }

    public void print1(){
        Order order = new Order();
        order.id = 1001;
        System.out.println(order.id);
        Order.name = "1111";
        System.out.println(Order.name);

    }

    public void setArray(){
        int[] intArray  = new int[10];
        intArray[3] = 121;
        System.out.println(intArray[1]);

        boolean[] booleans = new boolean[5];
        booleans[1] = false;
    }

    public void arrayLength(){
        double[] doubles = new double[20];
        System.out.println(doubles.length);
    }

    public long add(){
        return index++;
    }
    private long index = 1;
}

class Order{
    int id = 0;
    static String name;
}
